body {  
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;  
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}  

:root {
    --background-color: #f0f2f5;
    --text-color: #333;
    --button-bg-color: #4CAF50;
    --button-hover-bg-color: #45a049;
    --clipboard-bg-color: #ffffff;
    --clipboard-border-color: #ddd;
    --clipboard-shadow-color: rgba(0, 0, 0, 0.1);
    --code-bg-color: #f5f5f5;
}

body.dark-mode {
    --background-color: #1e1e1e;
    --text-color: #e0e0e0;
    --button-bg-color: #555;
    --button-hover-bg-color: #444;
    --clipboard-bg-color: #2e2e2e;
    --clipboard-border-color: #444;
    --clipboard-shadow-color: rgba(0, 0, 0, 0.5);
    --code-bg-color: #2b2b2b;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.search-refresh {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.title-add, .search-refresh {
    display: flex;
    gap: 10px;
    align-items: center;
}

input[type="text"], textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--clipboard-border-color);
    border-radius: 5px;
    font-size: 16px;
    background-color: var(--clipboard-bg-color);
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--button-bg-color);
    outline: none;
}

#clipboardInput {
    height: auto; /* 高度自适应 */
    min-height: 100px; /* 设置最小高度 */
    resize: vertical; /* 允许垂直调整大小 */
}

button {
    background-color: var(--button-bg-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-2px);
}

.clipboard-container {  
    margin-top: 20px;  
}  

.clipboard-block {  
    border: 1px solid var(--clipboard-border-color);  
    border-radius: 5px;  
    margin-bottom: 15px;  
    padding: 5px;  
    background-color: var(--clipboard-bg-color);
    box-shadow: 0 2px 4px var(--clipboard-shadow-color);
    display: flex;
    flex-direction: column;
}  

.clipboard-block header {  
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clipboard-bg-color);  
    padding: 2px 10px;
    border-bottom: 1px solid var(--clipboard-border-color);  
    border-radius: 5px 5px 0 0;
    font-size: 14px;
}  

.clipboard-block .content-icons {  
    display: flex;
    align-items: center;
    margin: 0px 10px;
}  

.clipboard-block pre {  
    margin: 0;  
    padding: 10px;  
    background: var(--code-bg-color);  
    border-radius: 5px;  
    overflow-x: auto;  
    white-space: pre-wrap;  
    word-wrap: break-word;  
    flex-grow: 1;
    width: calc(100% - 40px);
    cursor: pointer;
    text-align: left;
}  

.clipboard-block .buttons {  
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 5px 0;
}  

.clipboard-block .buttons button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    transition: color 0.3s ease;
    margin-left: 10px; /* 增加间距以美化布局 */
}

.clipboard-block .buttons button:hover {
    opacity: 0.8;
}

.clipboard-block .buttons button.delete {
    color: #FF5733; /* 删除按钮颜色 */
}

.clipboard-block .buttons button.copy {
    color: #4CAF50; /* 复制按钮颜色 */
}

.clipboard-block .buttons button.delete:hover {
    color: #e74c3c; /* 删除按钮悬停颜色 */
}

.clipboard-block .buttons button.copy:hover {
    color: #388E3C; /* 复制按钮悬停颜色 */
}

/* 开关按钮样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-left: auto;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--button-bg-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.footer {
    background-color: #f0f2f5;
    text-align: center;
    padding: 10px 0;
    color: #555;
    border-top: 1px solid #ddd;
}

.footer p {
    margin: 0;
    font-size: 14px;
}
